-
Notifications
You must be signed in to change notification settings - Fork 9.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Updated the Data Source Tags structure #1706
Conversation
Hey @apparentlymart Since we talked about this in #1423, I would like to know if we really require a migration there (which can be done), or if, as it does not work at all right now, we don't need it? Will continue to push updates for other data sources. Thanks! |
@@ -34,7 +34,6 @@ func dataSourceAwsAmiIds() *schema.Resource { | |||
ForceNew: true, | |||
Elem: &schema.Schema{Type: schema.TypeString}, | |||
}, | |||
"tags": dataSourceTagsSchema(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not even used in this Data Source
@@ -26,7 +26,6 @@ func dataSourceAwsEbsSnapshotIds() *schema.Resource { | |||
ForceNew: true, | |||
Elem: &schema.Schema{Type: schema.TypeString}, | |||
}, | |||
"tags": dataSourceTagsSchema(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not even used in this Data Source
27dd777
to
2b47ed6
Compare
@apparentlymart @radeksimko Letting you the final review :) Thanks! 👍 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
AFAICT data sources don't need migrations in general, because the data is always pulled from scratch as part of every plan
/apply
.
The reason we usually need a migration for a resource is to avoid no-op diffs (the exact same data, just differently structured) or avoid crashes caused by reading old state. Data sources practically never read old state or generally never compare state and produce diffs.
Also terraform apply -refresh=false
is no-op for data sources, so even if it's referenced anywhere, you'll just get the old state, but the Read() method won't get executed.
Thanks for the info there @radeksimko :) |
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thanks! |
Issues & Context
Fixes #853
Fixes #1423
Tests
AWS Instance
AWS AMI
EBS Snapshot
EBS Volume